package emulator.hardware.io.peripherals.iec;

public class IecSimDeviceFactory {

	public IecSimDevice createDevice(DeviceInfo device_info) {
		if (device_info.isEnabled())
		{
			if (device_info.getType().equalsIgnoreCase(DeviceInfo.getDeviceTypes()[DeviceInfo.PRINTER]))
				return new IecSimNullPrinter();
			if (device_info.getType().equalsIgnoreCase(DeviceInfo.getDeviceTypes()[DeviceInfo.DISK]))
				return new IecSimFsDriver(device_info.getFile());
		}
		return null;
	}

}
